﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="txDesign.aspx.cs" Inherits="enTXDesign" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>    
    <style type="text/css">
        body
        {
            margin: 0 auto;
            text-align:center;
            font-size: 12px;
        }
        table
        {
            border-collapse: collapse;
        }
        #divContainer
        {
        	margin: 0 auto;
            text-align:left;
            width: 770px;
        }
        .divTitle
        {
            height: 30px;
            line-height: 30px;
            vertical-align: middle; /*background:url('images/bg_Title.jpg') repeat-x bottom;*/
        }
        table.tblEdit
        {
            font-size: 12px;
            line-height: 30px;
        }
        /*GridView的样式*/#gvTX, #gvTX td, #gvTX th
        {
            line-height: 19px;
            border: solid 1px black;
        }
        #gvTX td table td
        {
            border: none;
        }
        ul.ulTable, ul.ulTable ul
        {
            list-style: none;
            margin: 0px;
            padding: 0px;
            line-height: 25px;
        }
        ul.ulTable ul > li
        {
            display: inline;
        }
        .style2
        {
            width: 60px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divContainer">
        <div class="divTitle">
            <b>英语题型管理与设计>></b></div>
        <div id="divBrowse">
            <asp:GridView ID="gvTX" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="True"
                PageSize="8" OnPageIndexChanging="gvTX_PageIndexChanging" OnRowDeleting="gvTX_RowDeleting"
                OnRowEditing="gvTX_RowEditing" DataKeyNames="txNum" OnSelectedIndexChanging="gvTX_SelectedIndexChanging">
                <RowStyle HorizontalAlign="Center" />
                <Columns>
                    <asp:BoundField HeaderText="题型编号" DataField="txNum" />
                    <asp:BoundField HeaderText="题型名称" DataField="txName" />
                    <asp:BoundField HeaderText="满分" DataField="fullScore" />
                    <asp:BoundField HeaderText="单分" DataField="singleScore" />
                    <asp:BoundField HeaderText="题数" DataField="tl" />
                    <asp:BoundField HeaderText="限时" DataField="timeArea" />
                    <asp:BoundField HeaderText="备注" DataField="bz" />
                    <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True">
                        <ItemStyle Width="55px" HorizontalAlign="Center" />
                    </asp:CommandField>
                </Columns>
                <SelectedRowStyle BackColor="#CCFFFF" />
            </asp:GridView>
        </div>
        <div class="divTitle">
            <b>添加或更新题型>></b>
        </div>
        <div>
            <table style="width: 100%;" class="tblEdit">
                <tr>
                    <td class="style2">
                        当前试卷：
                    </td>
                    <td style="width: 200px;">
                        <asp:Label ID="labCurrentExam" runat="server" Text="(请选择试卷)"></asp:Label>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        题型名称：
                    </td>
                    <td>
                        <asp:DropDownList ID="dropTX" runat="server">
                            <asp:ListItem Value="一、单项选择题">一、单项选择题</asp:ListItem>
                            <asp:ListItem Value="二、多项选择题">二、多项选择题</asp:ListItem>
                            <asp:ListItem Value="三、判断题">三、判断题</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        单个分值：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSingleScore" Width="70px" runat="server" Font-Size="12px"></asp:TextBox>
                        分/题</td>
                    <td>
                        &nbsp;
                        <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtSingleScore"
                            ErrorMessage="请输入0-150之间的数字！" MaximumValue="150" MinimumValue="0" Type="Integer">请输入0-150之间的数字！</asp:RangeValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        该题总分：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFullScore" Width="70px" runat="server" Font-Size="12px"></asp:TextBox>
                        分</td>
                    <td>
                        &nbsp;
                        <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtFullScore"
                            ErrorMessage="请输入0-150之间的数字！" MaximumValue="150" MinimumValue="0" Type="Integer">请输入0-150之间的数字！</asp:RangeValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        问题数目：
                    </td>
                    <td>
                        <asp:TextBox ID="txtCount" Width="70px" runat="server" Font-Size="12px"></asp:TextBox>
                        题</td>
                    <td>
                        &nbsp;
                        <asp:RangeValidator ID="RangeValidator3" runat="server" ControlToValidate="txtCount"
                            ErrorMessage="请输入0-300之间的数字！" MaximumValue="300" MinimumValue="0" Type="Integer">请输入0-300之间的数字！</asp:RangeValidator>
                    </td>
                </tr>
                <tr id="trTimeLimit">
                    <td class="style2">
                        时间限制：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTimeLimit" Width="70px" runat="server" Font-Size="12px"></asp:TextBox>
                        分钟
                    </td>
                    <td>
                        &nbsp;
                        <asp:RangeValidator ID="RangeValidator4" runat="server" ControlToValidate="txtTimeLimit"
                            ErrorMessage="请输入0-150之间的数字！" MaximumValue="150" MinimumValue="0" Type="Integer">请输入0-150之间的数字！</asp:RangeValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        试题备注：
                    </td>
                    <td>
                        <asp:TextBox ID="txtBZ" Width="170px" runat="server" Font-Size="12px"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" Text="添加" OnClick="btnSubmit_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
